<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //1.判断闰年
        var year = prompt("请输入您要查询的年份:")
        if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
            alert(year + "年是闰年")
        } else {
            alert(year + "年是平年")
        }

        //2.计算等级
        var score = prompt("请输入您的成绩:")
        if (score < 0 || score > 100) {
            alert("您的输入有误，请重新输入!!!")
        } else if (score >= 90) {
            alert("您的成绩等级为: A")
        } else if (score >= 80) {
            alert("您的成绩等级为: B")
        } else if (score >= 70) {
            alert("您的成绩等级为: C")
        } else if (score >= 60) {
            alert("您的成绩等级为: D")
        } else {
            alert("您的成绩不合格,请继续努力!!!")
        }
        
        //3.数字补0
        var time = prompt("请输入0~59之间的数字:")
        var result = time < 10 ? '0' + time : time;
        alert('最后的结果为:' + result)
    </script>
</head>

<body>

</body>

</html>